#include<iostream>
using namespace std;

inline double square(double a) {
    return a*a;
}

double power(double base,int exponent = 2) {
    double res = 1;
    for(int i=0;i<exponent;i++) {
        res *= base;
    }
    return res;
}

double calc(double base,int exponent = 2) {
    double res = 1;
    for(int i=0;i<exponent;i++) {
        res *= base;
    }
    return res;
}

double calc(double a,double b,char op) {
    if(op == '/' && b == 0) {
        cout << "Error: divide by zero" << endl;
        return 0;
    }
    switch(op) {
        case '+':return a+b;
        case '-':return a-b;
        case '*':return a*b;
        case '/':return a/b;
        default:return 0;
    }
}

double calc(int a,int b,char op) {
    return calc(static_cast<double>(a),static_cast<double>(b),op);
}

int main() {
    double num1,num2;
    char op;
    cin >> num1 >> num2 >> op;
    cout << fixed << setprecision(2);
    cout << "square(" << num1 << ")=" << square(num1) << endl;
    cout << "power(" << num1 << ",3)=" << power(num1,3) << endl;
    cout << num1 << " " << op << " " << num2 << "=" << calc(num1,num2,op) << endl;
    cout << calc(static_cast<int>(num1),static_cast<int>(num2),op) << endl;
    return 0;
}